import { ref } from 'vue'

export const searchFormRules = ref([
    {
        type: 'input',
        props: {
            label: '城市名称',
            prop: 'address',
            placeholder: '请输入城市名称',
        },
    },
])

export const tableHead = [
    {
        label: '城市名称',
        prop: 'address'
    },
    {
        label: '城市IP',
        prop: 'ipAddress',
    },
    {
        label: '端口',
        prop: 'port'
    },
    {
        label: '账号',
        prop: 'account',
    },
    {
        type: 'date:Unix',
        label: '创建时间',
        prop: 'createdAt',
    },
    {
        type: 'actionBar',
        label: '操作',
        width: 200,
        data: [
            {
                text: '删除',
                props: {
                    icon: 'Delete',
                },
            },
            {
                text: '修改',
                props: {
                    icon: 'Edit',
                },
            }
        ],
    },
]


export const formRules = [
    {
        type: 'input',
        props: {
            label: '地址',
            prop: 'address',
            placeholder: '请输入地址',
        },
        col: {
            span: 11
        }
    },
    {
        type: 'input',
        props: {
            label: 'IP',
            prop: 'ipAddress',
            placeholder: '请输入IP',
        },
        col: {
            span: 11
        }
    },
    {
        type: 'input',
        props: {
            label: '端口',
            prop: 'port',
            placeholder: '请输入端口',
        },
        col: {
            span: 11
        }
    },
    {
        type: 'input',
        props: {
            label: '账号',
            prop: 'account',
            placeholder: '请输入账号',
        },
        col: {
            span: 11
        }
    },
    {
        type: 'input',
        props: {
            label: '密码',
            prop: 'password',
            placeholder: '请输入密码',
        },
        col: {
            span: 11
        }
    },
    {
        type: 'slot',
        slotName: 'footer'
    }
]